import 'package:baseProjectFlutter/utils/app_utils.dart';
import '../date_utils.dart';
import 'platform_web_log.dart' if (dart.library.io) 'platform_io_log.dart';

class LogUtils {
  LogUtils._();
  static get TIME => DateUtils.getFormatTime(format: "yyyy-MM-dd HH:mm:ss.SSS");

  static void e(Object msg) {
    if (AppUtils.isDebug) {
      logError("$TIME $msg");
    }
  }

  static void i(Object msg) {
    if (AppUtils.isDebug) {
      logInfo("$TIME $msg");
    }
  }

  static void w(Object msg) {
    if (AppUtils.isDebug) {
      logWarn("$TIME $msg");
    }
  }

  static void d(Object msg) {
    if (AppUtils.isDebug) {
      logDefault("$TIME $msg");
    }
  }
}
